package com.csj.lc.controller;

import com.csj.lc.base.BaseController;
import com.csj.lc.entity.Company;
import com.csj.lc.entity.User;
import com.csj.lc.entity.dto.LayuiDTO;
import com.csj.lc.entity.dto.ReturnDTO;
import com.csj.lc.entity.dto.SearchDTO;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/company/")
public class CompanyController extends BaseController {

    @RequestMapping("/list")
    public String listPage(HttpServletRequest request){

        return "company/list";
    }


    @RequestMapping("/getList")
    @ResponseBody
    public LayuiDTO<Company> getList(HttpServletRequest request, Model model,
                                         @RequestParam(name="page",defaultValue ="1",required = false) int pageNo ,
                                         @RequestParam(name="limit",defaultValue ="10",required = false)int pageSize){
        return companyService.getList(request,model,pageNo,pageSize) ;
    }


}

